#分类统计字符个数
s = input()
x, y, z = 0, 0, 0

for c in s:
    if ord('a') <= ord(c) <= ord('z') or ord('A') <= ord(c) <= ord('Z'):
        x += 1
    elif ord('0') <= ord(c) <= ord('9'):
        y += 1
    else:
        z += 1

print('letter = {}, digit = {}, other = {}'.format(x, y, z))
